package com.myway.dto.clk;

import java.util.Date;

/**
 * 购票记录
 * @author zhuyankai
 *
 */
public class DTOBehaviorBuyTicketRecord implements Comparable<DTOBehaviorBuyTicketRecord> {
	
	/**
	 * 购票渠道
	 */
	private String channel;
	
	/**
	 * 起始地
	 */
	private String arrCode;
	
	/**
	 * 乘客名称
	 */
	private String passengerName;
	
	/**
	 * 航班号
	 */
	private String flightNo;
	
	/**
	 * 到达地
	 */
	private String depCode;
	
	/**
	 * 票价
	 */
	private Double fare;
	
	/**
	 * 购票日期
	 */
	private Date buyDate;
	
	/**
	 * 航班日期
	 */
	private Date depTime;
	
	/**
	 * 舱位（折扣）
	 */
	private String cabinClass;

	public String getChannel() {
		return channel;
	}

	public void setChannel(String channel) {
		this.channel = channel;
	}

	public String getArrCode() {
		return arrCode;
	}

	public void setArrCode(String arrCode) {
		this.arrCode = arrCode;
	}

	public String getPassengerName() {
		return passengerName;
	}

	public void setPassengerName(String passengerName) {
		this.passengerName = passengerName;
	}

	public String getFlightNo() {
		return flightNo;
	}

	public void setFlightNo(String flightNo) {
		this.flightNo = flightNo;
	}

	public String getDepCode() {
		return depCode;
	}

	public void setDepCode(String depCode) {
		this.depCode = depCode;
	}

	public Double getFare() {
		return fare;
	}

	public void setFare(Double fare) {
		this.fare = fare;
	}

	public Date getBuyDate() {
		return buyDate;
	}

	public void setBuyDate(Date buyDate) {
		this.buyDate = buyDate;
	}

	public Date getDepTime() {
		return depTime;
	}

	public void setDepTime(Date depTime) {
		this.depTime = depTime;
	}

	public String getCabinClass() {
		return cabinClass;
	}

	public void setCabinClass(String cabinClass) {
		this.cabinClass = cabinClass;
	}

	@Override
	public int compareTo(DTOBehaviorBuyTicketRecord o) {
		boolean before = this.buyDate.before(o.getBuyDate());
		
		if(before){
			return -1;
		} else {
			return 1;
		}
	}
	
	
	
	

}
